/**
 * Created by xiebang
 * Description
 * User:小谢
 * Date:2021-12-07
 * Time:21:08
 */
class Shape{
    public void draw(){
    }
}
class Cycle extends Shape{
    @Override
    public void draw() {
        System.out.println("画一个圆⭕");
    }
}

class Rect extends Shape{
    @Override
    public void draw() {
        System.out.println("画一个方片♦");
    }
}


public class TestDemo2 {
    public static void drawMap(Shape shape){
        shape.draw();
    }
    public static void main(String[] args) {
        Cycle cycle = new Cycle();
        drawMap(cycle);
        Rect rect = new Rect();
        drawMap(rect);
    }
}
